package com.movie.ticketing.schedule.service;

import com.movie.ticketing.schedule.entity.Hall;
import com.movie.ticketing.schedule.repository.HallRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HallService {
    @Autowired
    private HallRepository hallRepository;

    public List<Hall> getAllHalls() {
        return hallRepository.getAllHalls();
    }

    public Hall getHallById(Long id) {
        return hallRepository.getHallById(id);
    }

    public Hall saveHall(Hall hall) {
        return hallRepository.saveHall(hall);
    }

    public Hall updateHall(Long id, Hall hallDetails) {
        return hallRepository.updateHall(id, hallDetails);
    }

    public void deleteHall(Long id) {
        hallRepository.deleteHall(id);
    }
}